<template>
  <div>
    <el-timeline>
      <el-timeline-item
        timestamp="处理同行链接需要的软件"
        placement="top"
      >
        <el-card>
          <el-row :gutter="12">
            <el-col :span="8">
              <el-button
                type="primary"
                round
                icon="el-icon-download"
                @click="exportDocumentOne"
              >同行链接需要的软件
              </el-button>
            </el-col>
          </el-row>

        </el-card>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script>
export default {
  data() {
    return {
    }
  },
  created() {
  },
  methods: {
    exportDocument(filePath) {
      this.downloadA('http://101.201.64.236:9999/prod-api/tb/exportDocument?filePath=' + filePath)
    },
    exportDocumentOne() {
      const filepath = '/data/file/同行链接模版.xlsx'
      // const filepath = '/Users/mac/Documents/work/BI-Back/src/main/resources/dataTest.xlsx'
      this.exportDocument(filepath)
    },
    downloadA(url) {
      const a = document.createElement('a')
      a.href = url
      a.hidden = true
      // a.target = "_blank";
      document.body.appendChild(a)
      a.click()
      document.body.removeChild(a)
    },
    resetForm(formName) {
      this.$refs[formName].resetFields()
    },
    removeDomain(item) {
      var index = this.dynamicValidateForm.domains.indexOf(item)
      if (index !== -1) {
        this.dynamicValidateForm.domains.splice(index, 1)
      }
    },
    addDomain() {
      this.dynamicValidateForm.domains.push({
        value1: '',
        value2: '',
        key: Date.now()
      })
    }
  }
}
</script>

<style>
el-input {
  width: 100px;
  margin-right: 10px;
}

.el-dialog .el-input {
  width: 85%;
}

.blue-link {
  color: blue;
}

</style>
